#include "Land.h"

#include "Resource.h"

CLand::CLand(LPDIRECT3DDEVICE9 d3ddv,  LPDIRECT3DSURFACE9 backBuffer, LPD3DXSPRITE spriteHandler, float x, float y, int ID, int Object_State) : Object(x, y)
{
	this->setIDObjType(ID);
	p_sprite = new Sprite(spriteHandler, ResourceMng::GetInst(d3ddv, backBuffer)->GetTexture(L"..\\Resources\\Images\\land.png"), 0, 0);
	//w = 32;
	//h = 64;
	width = p_sprite->getTexture()->getWidth();
	height = p_sprite->getTexture()->getHeight();

	veloc_x = 0;
	veloc_y = 0;
	this->obj_state = Object_State;
}

CLand::~CLand()
{
	if (p_sprite)
	{
		delete p_sprite;
	}
}

void CLand::update(list<Object*>* obj_list, DxInput* input, float TPF)
{
	Object::update(obj_list, input, TPF);
}

void CLand::render(int cameraX, int cameraY)
{
	Object::render(cameraX, cameraY);
}
 
OBJECT_TYPE CLand::getObjectType()
{
	return OBJECT_LAND;
}